<?php
function mom_gn_news_box($cat) {
    ?>
<?php if(of_get_option('news_box_style') == 'new') { ?>
<div class="newsboxs">
        <div class="box_outer">
   <div class="news_box">
            <div class="news_box_heading">
                <div class="nb_dots">
                    <h2><a href="<?php echo get_category_link($cat); ?>"><?php echo get_cat_name( $cat ); ?> </a></h2>
                </div>
            </div> <!--End nb Heading-->
        
            <div class="news_box_left">
                <?php query_posts(array('showposts' => 1, 'cat' => $cat )); ?>
                <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
		<?php
		?>
                <div class="recent_news_item">
	    <?php if(mom_post_image() == false) {} else { ?>
	    <div class="recent_news_img">
	    <a href="<?php the_permalink(); ?>">
	    <?php $timthumb = of_get_option('timthumb');
		    if ($timthumb == true) { ?>
                <img src="<?php echo MOM_SCRIPTS ?>/timthumb.php?src=<?php echo mom_post_image('medium'); ?>&amp;h=153&amp;w=286&amp;zc=1" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		<?php } else { ?>
		            <?php 
                                $thumb = mom_post_image('medium'); 
                                $ntImage = aq_resize( $thumb, 286, 153, true );
                            ?>
		    <?php if (strpos(mom_post_image(), 'youtube')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="286" height="153" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
			
		    <?php } elseif (strpos(mom_post_image(), 'vimeo')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="286" height="153" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } elseif (strpos(mom_post_image(), 'dailymotion')) {?>
			<img src="<?php echo mom_post_image(); ?>" width="286" height="153" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } else { ?>
			<img src="<?php echo $ntImage; ?>"  alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    <?php } ?>
		<?php } ?>
	    <?php
	    global $post;
	    $type = get_post_meta($post->ID, 'mom_article_type', true);
	    if ($type == 'video') {
		echo "<span class='nb_video_icon'></span>";
	    } elseif ($type == 'slideshow') {
		echo "<span class='nb_slide_icon'></span>";
	    } elseif ($type == 'article') {
		echo "<span class='nb_article_icon'></span>";
	    }
	    ?>
	    </a>
	    </div>
	    <?php } //mom_post_image == false ?>
                <div class="recent_news_content">
		<h3 class="recent_news_title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
                <p class="recent_news_excpert">
		    <?php
		 if(of_get_option('html_exc') != false ) {
		    global $post;
			$excerpt = $post->post_excerpt;
			$contentex = get_the_content('');
			if($excerpt==''){
			    echo wp_html_excerpt($contentex,130);
			} else {
			echo $excerpt;
			}
		 } else {
			$excerpt = $post->post_excerpt;
			if($excerpt==''){
			$excerpt = get_the_content('');
			}
			echo wp_html_excerpt($excerpt,130);
		    
		 }
		        ?>
 <a class="nb_recent_more" href="<?php the_permalink(); ?>"><?php _e('more', 'theme'); ?></a> ... 
                </p>
		<?php if(of_get_option('post_meta') != false) { ?>
		<div class="nb_meta">
		<?php if(of_get_option('post_date') != false) { ?>
                <span class="news_date"><?php the_time(of_get_option('date_format')); ?></span>
		<?php } ?>
		</div> <!--End NB META-->
		<?php } ?>
                </div> <!--recent news Content-->
                </div> <!--recent News Item-->
                <?php endwhile; ?>
                <?php  else:  ?>
                <!-- Else in here -->
                <?php  endif; ?>
                <?php wp_reset_query(); ?>

            </div> <!--End News Box Left-->
            <div class="news_box_right">
                <ul class="nbs_more_news">
                 <?php query_posts(array('showposts' => 4, 'offset' => 1, 'cat' => $cat )); ?>
                <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                    <li>
	    <?php if(mom_post_image() == false) {} else { ?>
	    <div class="nb2_next2_img">
	    <a href="<?php the_permalink(); ?>">
	    <?php $timthumb = of_get_option('timthumb');
		    if ($timthumb == true) { ?>
                <img src="<?php echo MOM_SCRIPTS ?>/timthumb.php?src=<?php echo mom_post_image(); ?>&amp;h=64&amp;w=64&amp;zc=1" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		<?php } else { ?>
		            <?php 
                                $thumb = mom_post_image(); 
                                $ntImage = aq_resize( $thumb, 64, 64, true );
                            ?>
		    <?php if (strpos(mom_post_image(), 'youtube')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="64" height="64" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
			
		    <?php } elseif (strpos(mom_post_image(), 'vimeo')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="64" height="64" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } elseif (strpos(mom_post_image(), 'dailymotion')) {?>
			<img src="<?php echo mom_post_image(); ?>" width="64" height="64" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } else { ?>
			<img src="<?php echo $ntImage; ?>"  alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    <?php } ?>
		<?php } ?>
	    </a>
	    </div>
	    <?php } //mom_post_image == false ?>

			<h4><a href="<?php the_permalink(); ?>">
			    <?php the_title(); ?>
		    </a></h4>
		    		
		<?php if(of_get_option('post_meta') != false) { ?>
		<div class="nb2_meta">
		<?php if(of_get_option('post_date') != false) { ?>
                <span class="news_date"><?php the_time(of_get_option('date_format')); ?></span>
		<?php } ?>
                <?php if(of_get_option('post_cc') != false) { ?>
		<span class="news_comments_count"><a href="<?php comments_link(); ?>">(<?php comments_number(0, 1, '%'); ?>) <?php _e('comments', 'theme'); ?></a></span>
		<?php } ?>
		</div> <!--End NB META-->
		<?php } ?>
		    </li>
                <?php endwhile; ?>
                <?php  else:  ?>
                <!-- Else in here -->
                <?php  endif; ?>
                <?php wp_reset_query(); ?>
                </ul>
    
            </div> <!--End News Box Right-->
        </div> <!--News Box-->
    </div> <!--Box Outer-->
</div> <!--Newsboxs-->

<?php } elseif (of_get_option('news_box_style') == 'double') { ?>

<div class="nb_col2">
    <div class="box_outer">
   <div class="news_box">
            <div class="news_box_heading">
                <div class="nb_dots">
                    <h2><a href="<?php echo get_category_link($cat); ?>"><?php echo get_cat_name( $cat ); ?> </a></h2>
                </div>
            </div> <!--End nb Heading-->
        
            <div class="news_box_left">
                <?php query_posts(array('showposts' => 1, 'cat' => $cat )); ?>
                <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                <div class="recent_news_item">
                <h2 class="recent_news_title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>

	    <?php if(mom_post_image() == false) {} else { ?>
	    <div class="recent_news_img">
	    <a href="<?php the_permalink(); ?>">
	    <?php $timthumb = of_get_option('timthumb');
		    if ($timthumb == true) { ?>
                <img src="<?php echo MOM_SCRIPTS ?>/timthumb.php?src=<?php echo mom_post_image(); ?>&amp;h=93&amp;w=93&amp;zc=1" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		<?php } else { ?>
		            <?php 
                                $thumb = mom_post_image(); 
                                $ntImage = aq_resize( $thumb, 93, 93, true );
                            ?>
		    <?php if (strpos(mom_post_image(), 'youtube')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="93" height="93" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
			
		    <?php } elseif (strpos(mom_post_image(), 'vimeo')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="93" height="93" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } elseif (strpos(mom_post_image(), 'dailymotion')) {?>
			<img src="<?php echo mom_post_image(); ?>" width="93" height="93" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } else { ?>
			<img src="<?php echo $ntImage; ?>"  alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    <?php } ?>
		<?php } ?>
	    <?php
	    global $post;
	    $type = get_post_meta($post->ID, 'mom_article_type', true);
	    if ($type == 'video') {
		echo "<span class='nb_video_icon'></span>";
	    } elseif ($type == 'slideshow') {
		echo "<span class='nb_slide_icon'></span>";
	    } elseif ($type == 'article') {
		echo "<span class='nb_article_icon'></span>";
	    }
	    ?>
	    </a>
	    </div>
	    <?php } //mom_post_image == false ?>
                <div class="recent_news_content">
                <p class="recent_news_excpert">
                        <?php global $post;
			if(of_get_option('html_exc') != false ) {
			$excerpt = $post->post_excerpt;
			$contentex = get_the_content('');
			if($excerpt==''){
			    echo wp_html_excerpt($contentex,80);
			} else {
			echo $excerpt;
			}
			} else {
			$excerpt = $post->post_excerpt;
			if($excerpt==''){
			$excerpt = get_the_content('');
			}
			echo wp_html_excerpt($excerpt,80);
  			}
                        ?> <a class="nb_recent_more" href="<?php the_permalink(); ?>"><?php _e('more', 'theme'); ?></a> ... 
                </p>
		<?php if(of_get_option('post_meta') != false) { ?>
		<div class="nb_meta">
		<?php if(of_get_option('post_date') != false) { ?>
                <span class="news_date"><?php the_time(of_get_option('date_format')); ?></span>
		<?php } ?>
		</div> <!--End NB META-->
		<?php } ?>
                </div> <!--recent news Content-->
                </div> <!--recent News Item-->
                <?php endwhile; ?>
                <?php  else:  ?>
                <!-- Else in here -->
                <?php  endif; ?>
                <?php wp_reset_query(); ?>

            </div> <!--End News Box Left-->
                <ul class="nb2_next2_news">
                 <?php query_posts(array('showposts' => 2, 'offset' => 1, 'cat' => $cat )); ?>
                <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                    <li>
	    <?php if(mom_post_image() == false) {} else { ?>
	    <div class="nb2_next2_img">
	    <a href="<?php the_permalink(); ?>">
	    <?php $timthumb = of_get_option('timthumb');
		    if ($timthumb == true) { ?>
                <img src="<?php echo MOM_SCRIPTS ?>/timthumb.php?src=<?php echo mom_post_image(); ?>&amp;h=55&amp;w=55&amp;zc=1" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		<?php } else { ?>
		            <?php 
                                $thumb = mom_post_image(); 
                                $ntImage = aq_resize( $thumb, 55, 55, true );
                            ?>
		    <?php if (strpos(mom_post_image(), 'youtube')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="55" height="55" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
			
		    <?php } elseif (strpos(mom_post_image(), 'vimeo')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="55" height="55" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } elseif (strpos(mom_post_image(), 'dailymotion')) {?>
			<img src="<?php echo mom_post_image(); ?>" width="55" height="55" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } else { ?>
			<img src="<?php echo $ntImage; ?>"  alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    <?php } ?>
		<?php } ?>
	    </a>
	    </div>
	    <?php } //mom_post_image == false ?>

			<a href="<?php the_permalink(); ?>">
			    <?php the_title(); ?>
		    </a>
		    		
		<?php if(of_get_option('post_meta') != false) { ?>
		<div class="nb2_meta">
		<?php if(of_get_option('post_date') != false) { ?>
                <span class="news_date"><?php the_time(of_get_option('date_format')); ?></span>
		<?php } ?>
                <?php if(of_get_option('post_cc') != false) { ?>
		<span class="news_comments_count"><a href="<?php comments_link(); ?>">(<?php comments_number(0, 1, '%'); ?>) <?php _e('comments', 'theme'); ?></a></span>
		<?php } ?>
		</div> <!--End NB META-->
		<?php } ?>
		    </li>
                <?php endwhile; ?>
                <?php  else:  ?>
                <!-- Else in here -->
                <?php  endif; ?>
                <?php wp_reset_query(); ?>
                </ul>
    
            <div class="news_box_right">
		<div class="more_news_wrap">
                <ul class="more_news">
                            <?php query_posts(array('showposts' => 2, 'offset' => 3, 'cat' => $cat )); ?>
                <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                    <li><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><span><?php _e('&raquo;', 'theme'); ?></span>
			     
			  <?php if( is_rtl() ) { ?>
				<?php if (strlen($post->post_title) > 40) {
					    $title = get_the_title('');
					    echo wp_html_excerpt($title,40) . '...'; } else {
					the_title();
					} ?>
				<?php } else { ?>
			    <?php if (strlen($post->post_title) > 40) {
			    echo substr(the_title($before = '', $after = '', FALSE), 0, 40) . '...'; } else {
			    the_title();
			    } ?>
			    <?php } ?>

			    
		    </a></li>
                <?php endwhile; ?>
                <?php  else:  ?>
                <!-- Else in here -->
                <?php  endif; ?>
                <?php wp_reset_query(); ?>
                </ul>
			</div> <!--more_news_wrap-->
	    </div> <!--End News Box Right-->
        </div> <!--News Box-->
    </div> <!--Box Outer-->
</div> <!--NB COL-->
    <?php } //end double
    else {
    ?>
        <div class="box_outer">
   <div class="news_box">
            <div class="news_box_heading">
                <div class="nb_dots">
                    <h2><a href="<?php echo get_category_link($cat); ?>"><?php echo get_cat_name( $cat ); ?> </a></h2>
                </div>
            </div> <!--End nb Heading-->
        
            <div class="news_box_left">
                <?php query_posts(array('showposts' => 1, 'cat' => $cat )); ?>
                <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
		<?php
		$nbImgw = of_get_option('news_box_img_w');
		$nbImgh = of_get_option('news_box_img_h');
		$nbExl = of_get_option('news_box_ex_l');
		?>
                <div class="recent_news_item">
                <h4 class="recent_news_title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4>
		
	    <?php if(mom_post_image() == false) {} else { ?>
	    <div class="recent_news_img">
	    <a href="<?php the_permalink(); ?>">
	    <?php $timthumb = of_get_option('timthumb');
		    if ($timthumb == true) { ?>
                <img src="<?php echo MOM_SCRIPTS ?>/timthumb.php?src=<?php echo mom_post_image(); ?>&amp;h=<?php echo $nbImgh; ?>&amp;w=<?php echo $nbImgw; ?>&amp;zc=1" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		<?php } else { ?>
		            <?php 
                                $thumb = mom_post_image(); 
                                $ntImage = aq_resize( $thumb, $nbImgw, $nbImgh, true );
                            ?>
		    <?php if (strpos(mom_post_image(), 'youtube')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="<?php echo $nbImgw; ?>" height="<?php echo $nbImgh; ?>" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
			
		    <?php } elseif (strpos(mom_post_image(), 'vimeo')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="<?php echo $nbImgw; ?>" height="<?php echo $nbImgh; ?>" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } elseif (strpos(mom_post_image(), 'dailymotion')) {?>
			<img src="<?php echo mom_post_image(); ?>" width="<?php echo $nbImgw; ?>" height="<?php echo $nbImgh; ?>" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } else { ?>
			<img src="<?php echo $ntImage; ?>"  alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    <?php } ?>
		<?php } ?>
	    <?php
	    global $post;
	    $type = get_post_meta($post->ID, 'mom_article_type', true);
	    if ($type == 'video') {
		echo "<span class='nb_video_icon'></span>";
	    } elseif ($type == 'slideshow') {
		echo "<span class='nb_slide_icon'></span>";
	    } elseif ($type == 'article') {
		echo "<span class='nb_article_icon'></span>";
	    }
	    ?>
	    </a>
	    </div>
	    <?php } //mom_post_image == false ?>
                <div class="recent_news_content">
                <p class="recent_news_excpert">
		    <?php
		 if(of_get_option('html_exc') != false ) {
		    global $post;
			$excerpt = $post->post_excerpt;
			$contentex = get_the_content('');
			if($excerpt==''){
			    echo wp_html_excerpt($contentex,$nbExl);
			} else {
			echo $excerpt;
			}
		 } else {
			$excerpt = $post->post_excerpt;
			if($excerpt==''){
			$excerpt = get_the_content('');
			}
			echo wp_html_excerpt($excerpt,$nbExl);
		    
		 }
		        ?>
 <a class="nb_recent_more" href="<?php the_permalink(); ?>"><?php _e('more', 'theme'); ?></a> ... 
                </p>
		<?php if(of_get_option('post_meta') != false) { ?>
		<div class="nb_meta">
		<?php if(of_get_option('post_date') != false) { ?>
                <span class="news_date"><?php the_time(of_get_option('date_format')); ?></span>
		<?php } ?>
                <?php if(of_get_option('post_cc') != false) { ?>
		<span class="news_comments_count"><a href="<?php comments_link(); ?>">(<?php comments_number(0, 1, '%'); ?>) <?php _e('comments', 'theme'); ?></a></span>
		<?php } ?>
		</div> <!--End NB META-->
		<?php } ?>
                </div> <!--recent news Content-->
                </div> <!--recent News Item-->
                <?php endwhile; ?>
                <?php  else:  ?>
                <!-- Else in here -->
                <?php  endif; ?>
                <?php wp_reset_query(); ?>

            </div> <!--End News Box Left-->
            <div class="news_box_right">
		<div class="more_news_wrap">
		<div class="left_ul">
                <ul class="more_news">
                            <?php query_posts(array('showposts' => 3, 'offset' => 1, 'cat' => $cat )); ?>
                <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                    <li><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><span><?php _e('&raquo;', 'theme'); ?></span>
			     
			  <?php if( is_rtl() ) { ?>
				<?php if (strlen($post->post_title) > 45) {
					    $title = get_the_title('');
					    echo wp_html_excerpt($title,45) . '...'; } else {
					the_title();
					} ?>
				<?php } else { ?>
			    <?php if (strlen($post->post_title) > 45) {
			    echo substr(the_title($before = '', $after = '', FALSE), 0, 45) . '...'; } else {
			    the_title();
			    } ?>
			    <?php } ?>

			    
		    </a></li>
                <?php endwhile; ?>
                <?php  else:  ?>
                <!-- Else in here -->
                <?php  endif; ?>
                <?php wp_reset_query(); ?>
                </ul>
		</div> <!--Left ul-->
		<div class="right_ul">
                <ul class="more_news">
                            <?php query_posts(array('showposts' => 3, 'offset' => 4, 'cat' => $cat )); ?>
                <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                    <li><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><span><?php _e('&raquo;', 'theme'); ?></span>
			     
			  <?php if( is_rtl() ) { ?>
			  <?php if (strlen($post->post_title) > 45) {
					    $title = get_the_title('');
					    echo wp_html_excerpt($title,45) . '...'; } else {
					the_title();
					} ?>
				<?php } else { ?>
				 <?php if (strlen($post->post_title) > 45) {
			    echo substr(the_title($before = '', $after = '', FALSE), 0, 45) . '...'; } else {
			    the_title();
			    } ?>
			    <?php } ?>

			    
		    </a></li>
                <?php endwhile; ?>
                <?php  else:  ?>
                <!-- Else in here -->
                <?php  endif; ?>
                <?php wp_reset_query(); ?>
                </ul>
		</div> <!--more_news_wrap-->
		</div>
            </div> <!--End News Box Right-->
        </div> <!--News Box-->
    </div> <!--Box Outer-->
    <?php } //End news box style ?>
<?php
}
function cat_article () { ?>
    <div class="box_outer">
    <article class="cat_article <?php sticky_class(); ?>">
        <h2 class="cat_article_title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
	<?php if(of_get_option('cat_share_on') != false) {} else { ?>
        <?php mom_cat_share(); ?>
    <?php } ?>
        <div class="cat_article_warap">
 	<?php if(of_get_option('post_meta') != false) { ?>
    <div class="article_meta">
 	<?php if(of_get_option('post_an') != false) { ?>
       <span class="meta_author"><?php _e('Posted by', 'theme'); ?>: <?php the_author_posts_link(); ?></span>
	<?php } ?>
	<?php if(of_get_option('post_date') != false) { ?>
       <span class="meta_date"><?php _e('Posted date', 'theme'); ?>:  <strong><?php the_time(of_get_option('date_format')); ?></strong></span>
       <?php } ?>
	<?php if(of_get_option('post_cc') != false) { ?>
       <span class="meta_sap">|</span> <span class="meta_comments"><?php _e('comment', 'theme'); ?> : <a href="<?php comments_link(); ?>"><?php comments_number(0, 1, '%'); ?></a></span>
       <?php } ?>
    </div> <!--article meta-->
	<?php } else {
	    echo "<div style='height:20px;'></div>";
	    } ?>
    
	<?php if(mom_post_image() == false) {} else { ?>
        <div class="cat_article_img">
	    <div class="cat_img">
			    <a href="<?php the_permalink(); ?>">
	    <?php $timthumb = of_get_option('timthumb');
		    if ($timthumb == true) { ?>
                <img src="<?php echo MOM_SCRIPTS ?>/timthumb.php?src=<?php echo mom_post_image('medium'); ?>&amp;h=193&amp;w=215&amp;zc=1" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		<?php } else { ?>
		            <?php 
                                $thumb = mom_post_image('medium'); 
                                $ntImage = aq_resize( $thumb, 215, 193, true );
                            ?>
		    <?php if (strpos(mom_post_image(), 'youtube')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="215" height="193" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
			
		    <?php } elseif (strpos(mom_post_image(), 'vimeo')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="215" height="193" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } elseif (strpos(mom_post_image(), 'dailymotion')) {?>
			<img src="<?php echo mom_post_image(); ?>" width="215" height="193" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } else { ?>
			<img src="<?php echo $ntImage; ?>"  alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    <?php } ?>
		<?php } ?>
	    <?php
	    global $post;
	    $type = get_post_meta($post->ID, 'mom_article_type', true);
	    if ($type == 'video') {
		echo "<span class='ca_video_icon'></span>";
	    } elseif ($type == 'slideshow') {
		echo "<span class='ca_slide_icon'></span>";
	    } elseif ($type == 'article') {
		echo "<span class='ca_article_icon'></span>";
	    }
	    ?>
	    </a>
	    </div>
        </div> <!--Cat article Img-->
       <?php } //mom_post_image == false ?>
        <div class="cat_article_content">
        <p>
                        <?php global $post;

			if(of_get_option('html_exc') != false ) {
			$excerpt = $post->post_excerpt;
			$contentex = get_the_content('');
			if($excerpt==''){
			    echo wp_html_excerpt($contentex,410);
			} else {
			echo $excerpt;
			}
			
			} else {

            $excerpt = $post->post_excerpt;
            if($excerpt==''){
            $excerpt = get_the_content('');
            }
            echo wp_html_excerpt($excerpt,410);
			    
			}
                        ?>  ... 
        </p>
        <a class="article_read_more" href="<?php the_permalink(); ?>"><?php _e('Read more', 'theme'); ?> <span><?php _e('&#8250;', 'theme'); ?></span></a>
        </div> <!--Cat article Content-->
        </div>
	<?php if(of_get_option('cat_share_on') != false) {
	    
	} else { ?>
	        <div class="cat_mob"><?php mom_cat_share(); ?></div>
	<?php } ?>

    </article> <!--End Cat Article-->
    </div> <!--Box Outer-->

<?php
}

function mom_news_tab($content) { ?>

                <ul class="nbtabs_content">
		            <?php
            $tab_display = of_get_option($content.'_display'); 
            $tab_tag = of_get_option($content.'_tag'); 
            $tab_cat = of_get_option($content.'_category');
	     $count = of_get_option($content.'_posts');
            ?>
	    <?php if($tab_display == 'category') { ?>
                 <?php query_posts(array('showposts' => $count, 'cat' => $tab_cat )); ?>
	    <?php } ?>
	    <?php if($tab_display == 'lates') { ?>
                 <?php query_posts(array('showposts' => $count )); ?>
	    <?php } ?>

	    <?php if($tab_display == 'tag') { ?>
                 <?php query_posts(array('showposts' => $count, 'tag' => $tab_tag )); ?>
	    <?php } ?>

                <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                    <li>
	    <?php if(mom_post_image() == false) {} else { ?>
	    <div class="nt_image">
	    <a href="<?php the_permalink(); ?>">
	    <?php $timthumb = of_get_option('timthumb');
		    if ($timthumb == true) { ?>
                <img src="<?php echo MOM_SCRIPTS ?>/timthumb.php?src=<?php echo mom_post_image(); ?>&amp;h=73&amp;w=100&amp;zc=1" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		<?php } else { ?>
		            <?php 
                                $thumb = mom_post_image(); 
                                $ntImage = aq_resize( $thumb, 100, 73, true );
                            ?>
		    <?php if (strpos(mom_post_image(), 'youtube')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="100" height="73" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
			
		    <?php } elseif (strpos(mom_post_image(), 'vimeo')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="100" height="73" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } elseif (strpos(mom_post_image(), 'dailymotion')) {?>
			<img src="<?php echo mom_post_image(); ?>" width="100" height="73" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } else { ?>
			<img src="<?php echo $ntImage; ?>"  alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    <?php } ?>
		<?php } ?>
	    </a>
	    </div>
	    <?php } //mom_post_image == false ?>
            <h3 class="nt_post_title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
                            <p class="recent_news_excpert">
		    <?php
		 if(of_get_option('html_exc') != false ) {
		    global $post;
			$excerpt = $post->post_excerpt;
			$contentex = get_the_content('');
			if($excerpt==''){
			    echo wp_html_excerpt($contentex,150);
			} else {
			echo $excerpt;
			}
		 } else {
			$excerpt = $post->post_excerpt;
			if($excerpt==''){
			$excerpt = get_the_content('');
			}
			echo wp_html_excerpt($excerpt,150);
		    
		 }
		        ?>
 <a class="nb_recent_more" href="<?php the_permalink(); ?>"><?php _e('more', 'theme'); ?></a> ... 
                </p>
		<?php if(of_get_option('post_meta') != false) { ?>
		<div class="nb_meta">
		<?php if(of_get_option('post_date') != false) { ?>
                <span class="news_date"><?php the_time(of_get_option('date_format')); ?></span>
		<?php } ?>
		</div> <!--End NB META-->
		<?php } ?>

                    </li>     

                <?php endwhile; ?>
                <?php  else:  ?>
                <!-- Else in here -->
                <?php  endif; ?>
                <?php wp_reset_query(); ?>
                </ul>

<?php
}
?>